
package controlpack;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.StringTokenizer;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.LineIterator;


public class panggilCSV_buatNyobaDoang {
    public static void main(String[] args) throws FileNotFoundException, IOException {
        File file = new File("F:/SIGMA CIPTA CARAKA/cobaboba/databasejdbc/tesPR.csv");
        LineIterator it = FileUtils.lineIterator(file);
        String line = "";

        while(it.hasNext()){
            line = it.nextLine().toString();
            line = line.replace(',', ' ');
            StringTokenizer st = new StringTokenizer(line);
            ArrayList arr = new ArrayList();
            while(st.hasMoreElements()) {
                arr.add(st.nextElement().toString());
            }
            for(int i=0;i<arr.size();i++) {
                System.out.println(arr.get(i));
            }
            System.out.println("---");
        }
        LineIterator.closeQuietly(it);
    }
}
